clang-tidy readability-static-accessed-through-instance on gui.
authortsteven4 <tsteven4@gmail.com>
Sun, 3 Mar 2019 17:33:14 +0000 (10:33 -0700)
committertsteven4 <tsteven4@gmail.com>
Sun, 3 Mar 2019 17:33:14 +0000 (10:33 -0700)
gui/main.cc

index 77762f3a9c12d06dbbe3f981f6b2efd047da74f3..d92cc7bb524f9cf1014bc7b6a7dd2dba45a741d1 100644 (file)
@@ -49,9 +49,8 @@ int main(int argc, char** argv)
 #error this version of Qt is not supported.
 #endif
 
-  QApplication* app;
-  app = new QApplication(argc, argv);
-  app->setWindowIcon(QIcon(":/images/appicon.png"));
+  QApplication app(argc, argv);
+  QApplication::setWindowIcon(QIcon(":/images/appicon.png"));
 
   QString newPath = "PATH=" + QApplication::applicationDirPath() +
                     QString(pathSeparator) + getenv("PATH");
@@ -65,7 +64,7 @@ int main(int argc, char** argv)
 
   MainWindow mainWindow(nullptr);
   mainWindow.show();
-  app->exec();
+  QApplication::exec();
 
   return 0;
 }